	// 百度地图API功能
	/* http://lbsyun.baidu.com/jsdemo.htm#c1_7 */
	var map = new BMap.Map("allmap");
	var point = new BMap.Point(121.030826,23.720103);
	map.centerAndZoom(point, 8);//地图中心点的展示级别，数字越小，展示的范围越大
	//map.addControl(new BMap.NavigationControl());               // 添加平移缩放控件
	map.addControl(new BMap.ScaleControl());                    // 添加比例尺控件
	//map.addControl(new BMap.OverviewMapControl());              //添加缩略地图控件
	//map.enableScrollWheelZoom();                            //启用滚轮放大缩小
	map.addControl(new BMap.MapTypeControl());          //添加地图类型控件
	
	//地图的风格
	var  mapStyle ={ 
	        features: ["road", "building","water","land"],//隐藏地图上的poi
	        style : "light"  //设置地图风格为高端黑
	    }
	map.setMapStyle(mapStyle);

	function add_oval(centre, x, y) {
		var assemble = new Array();
		var angle;
		var dot;
		var tangent = x / y;
		for (i = 0; i < 36; i++) {
			angle = (2 * Math.PI / 36) * i;
			dot = new BMap.Point(centre.lng + Math.sin(angle) * y * tangent,
					centre.lat + Math.cos(angle) * y);
			assemble.push(dot);
		}
		return assemble;
	}
	//add_oval(point, 0.1, 0.8);其中0.1和0.8分别代表椭圆的短轴和长轴的长度
	//将椭圆的方法放到百度地图几何图形的构造中，从而由其完成椭圆的绘制
	var oval = new BMap.Polygon(add_oval(point,1.6,2.1), {
		strokeColor : "blue",
		strokeWeight : 2,    //设置椭圆的线条宽度，值越小，椭圆的线宽越细
		strokeOpacity : 0.5, //透明度为0.5
		strokeStyle:"dashed"
	});
	oval.setFillColor();     //设置填充颜色为无
	
	
	map.addOverlay(oval);    //意思是给百度地图增加一个椭圆的覆盖物
	
	//默认的椭圆的编辑状态为不可以编辑，可以增加属性，使其变成可以编辑的状态，详情参考
	//在覆盖物示例中，点击线面可编辑
	//oval.enableEditing();//此时椭圆会出现很多的节点，为了不影响下面代码将椭圆内置十字丝，先将这块代码注释
	
	//相当于分别得到椭圆的36个直线段的路径
	var path = oval.getPath();	
	//画两条线，将椭圆的分为四个部分
	var polyline1 = new BMap.Polyline([
		path[0],path[18]
	], {strokeColor:"blue", strokeWeight:3, strokeOpacity:0.5, strokeStyle:"dashed"});
	
	var polyline2 = new BMap.Polyline([
		path[9],path[27]
	], {strokeColor:"blue", strokeWeight:3, strokeOpacity:0.5, strokeStyle:"dashed"}); 
	
	map.addOverlay(polyline1);
	map.addOverlay(polyline2);

	
	//下面是给指定的位置进行标注，英文单词为marker
	var marker_eastNorth = new BMap.Marker(new BMap.Point(121.952177,24.585967));
	marker_eastNorth.setTitle("东北中心点:东经:121.952177°,北纬:24.585967°");
	map.addOverlay(marker_eastNorth);
	//添加覆盖物的文字标签
	var label_eastNorth = new BMap.Label("东北中心点",{offset:new BMap.Size(10,-10)});
	marker_eastNorth.setLabel(label_eastNorth);
	label_eastNorth.setStyle({
		 color : "black",
		 fontSize : "12px",
		 height : "0px",
		 lineHeight : "0px",
		 fontFamily:"微软雅黑"
	 });
	
	
	var marker_eastSouth = new BMap.Marker(new BMap.Point(121.43302,22.681324));
	marker_eastSouth.setTitle("东南中心点:东经:121.43302°,北纬:22.681324°");
	map.addOverlay(marker_eastSouth);
	//添加覆盖物的文字标签
	var label_eastSouth = new BMap.Label("东南中心点",{offset:new BMap.Size(10,-10)});
	marker_eastSouth.setLabel(label_eastSouth);
	label_eastSouth.setStyle({
		 color : "black",
		 fontSize : "12px",
		 height : "0px",
		 lineHeight : "0px",
		 fontFamily:"微软雅黑"
	 });
	
	
	var marker_westNorth = new BMap.Marker(new BMap.Point(120.020461,23.026676));
	marker_westNorth.setTitle("西北中心点:东经:120.020461°,北纬:23.026676°");
	map.addOverlay(marker_westNorth);
	//添加覆盖物的文字标签
	var label_westNorth = new BMap.Label("西北中心点",{offset:new BMap.Size(10,-10)});
	marker_westNorth.setLabel(label_westNorth);
	label_westNorth.setStyle({
		 color : "black",
		 fontSize : "12px",
		 height : "0px",
		 lineHeight : "0px",
		 fontFamily:"微软雅黑"
	 });
	
	
	var marker_westSouth = new BMap.Marker(new BMap.Point(120.879097,25.050368));
	marker_westSouth.setTitle("西南中心点:东经:120.879097°,北纬:25.050368°");
	map.addOverlay(marker_westSouth);
	//添加覆盖物的文字标签
	var label_westSouth = new BMap.Label("西南中心点",{offset:new BMap.Size(10,-10)});
	marker_westSouth.setLabel(label_westSouth);
	label_westSouth.setStyle({
		 color : "black",
		 fontSize : "12px",
		 height : "0px",
		 lineHeight : "0px",
		 fontFamily:"微软雅黑"
	 });
	
	
	
	

